import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/list`,
      method: 'post',
      data
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/edit`,
      method: 'post',
      data
    })
  },
  // 提交
  submit(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/batch-submit`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 批量审核
  batchAudit(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/batch-audit`,
      method: 'post',
      data
    })
  },
  // 作废
  cancel(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/batch-cancel`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 采购处理
  purchaseProcess(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/purchase-process`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 反审
  back(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/batch-back`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 统计
  total(data) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/total`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 获取采购采购处理提示信息
  getMessage(params) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-change/get-message`,
      method: 'get',
      params
    })
  },
}
